
#include "S_12_MachineState_doGet.h"
#include "mi_iid_define.h"
#include "property_decoder.h"
#include "section_define.h"
#include "main.h"

extern uint8_t  g_uNo1RegList[PBS_NO1REGSIZE];
extern uint8_t  g_uNo2RegList[PBS_NO2REGSIZE];
extern uint8_t  g_uNo3RegList[PBS_NO3REGSIZE];
extern unsigned char g_uNo4RegList[PBS_NO4REGSIZE];
extern short g_Section5Info[24];
/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_1_IndoorPipeTemp_doGet(property_operation_t *o)
{
	PRINTF("%s %d\r\n",__FUNCTION__,__LINE__);
	uint16_t Data = 0;
	float Temp = 0.0;
	InDoorBusReg RegSection2 = {0};
#if 	PROPERTY_TYPE
	
	Data = ((g_uNo2RegList[0x013D-0x0100]<<8) | g_uNo2RegList[0x13C-0x100]) & 0x7FFF;
	Temp = (float)(Data - 1000)/10.0;
	property_value_new_float(&o->value,Temp);
	
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = -16.0; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 2000, 步长: 1
 */
static void P_12_3_IndoorFanSpeed_doGet(property_operation_t *o)
{
#if 	PROPERTY_TYPE
	property_value_new_integer(&o->value,((g_uNo2RegList[0x137-0x100]<<8) | (g_uNo2RegList[0x136-0x100])));
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 6;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_boolean(true 或 false)　
 * 取值: true 或　false
 */
static void P_12_4_RealHeaterSwitch_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection2 = {0};
#if 	PROPERTY_TYPE
	RegSection2.V8 = GetPbsRegValue(0x0146);
	property_value_new_boolean(&o->value,RegSection2.BIT.bit0);
#else	
	o->value.format = PROPERTY_FORMAT_BOOLEAN;
    o->value.data.boolean.value = true; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 1(Lever1), 2(Lever2), 3(Lever3), 4(Lever4), 5(Lever5), 6(Lever6), 7(Lever7), 8(Lever8), 9(Lever9), 0(Lever0)
 */
static void P_12_5_RealindoorFanLever_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x20);
	property_value_new_integer(&o->value,RegSection1.V8);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 0(Off), 1(Middle Light), 2(High Light)
 */
static void P_12_6_LightactivatedLevel_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection2 = {0};
#if 	PROPERTY_TYPE
	RegSection2.V8 = GetPbsRegValue(0x147);
	property_value_new_integer(&o->value,RegSection2.V8);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_7_OutdoorTemp_doGet(property_operation_t *o)
{
	uint16_t Data = 0;
	PRINTF("%s %d\r\n",__FUNCTION__,__LINE__);
	float Temp = 0.0;
#if 	PROPERTY_TYPE
		Data = ((g_uNo3RegList[0x203-0x200]<<8) | g_uNo3RegList[0x202-0x200]) & 0x7FFF;
		Temp = (float)(Data-1000)/10.0;
		property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = -16.0; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 2000, 步长: 1
 */
static void P_12_39_OutFanSpeed_doGet(property_operation_t *o)
{
#if 	PROPERTY_TYPE
	property_value_new_integer(&o->value,((g_uNo3RegList[0x22A-0x200]<<8) | (g_uNo3RegList[0x229-0x200])));
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_8_OutdoorPipeTemp_doGet(property_operation_t *o)
{
	uint16_t Data = 0;
	float Temp = 0.0;
#if 	PROPERTY_TYPE
//	if(g_uNo3RegList[0x20D-0x200] & 0x80)
	{
		Data = ((g_uNo3RegList[0x20D-0x200]<<8) | g_uNo3RegList[0x20C-0x200]) & 0x7FFF;
		Temp = (float)(Data-1000)/10.0;
		property_value_new_float(&o->value,Temp);
	}
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = -16.0; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_9_OutdoorExhaustTemp_doGet(property_operation_t *o)
{
	uint16_t Data = 0;
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Data = ((g_uNo3RegList[0x205-0x200]<<8) | g_uNo3RegList[0x204-0x200]) & 0x7FFF;
	Temp = (float)(Data-1000)/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 66.0; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 0(Lever0), 1(Lever1), 2(Lever2), 3(Lever3), 4(Lever4), 5(Lever5), 6(Lever6), 7(Lever7), 8(Lever8), 9(Lever9)
 */
static void P_12_10_OutdoorFanLever_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection3 = {0};
#if 	PROPERTY_TYPE
	RegSection3.V8 = GetPbsRegValue(0x226);
	property_value_new_integer(&o->value,RegSection3.BIT1.bit0_6);	
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: 0.0, 最大值: 200.0, 步长: 1.0
 */
static void P_12_11_CompressorFrequency_doGet(property_operation_t *o)
{
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Temp = (float)((g_uNo3RegList[0x225-0x200]<<8) | g_uNo3RegList[0x224-0x200])/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 66.0; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 100, 步长: 1
 */
static void P_12_43_IndooorHumidity_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection2 = {0};	
#if 	PROPERTY_TYPE
	RegSection2.V8 = GetPbsRegValue(0x140);
		property_value_new_integer(&o->value,RegSection2.BIT1.bit0_6);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_boolean(true 或 false)　
 * 取值: true 或　false
 */
static void P_12_12_FourwayValveSwitch_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection3 = {0};
#if 	PROPERTY_TYPE
	RegSection3.V8 = GetPbsRegValue(0x201);
	property_value_new_boolean(&o->value,RegSection3.BIT.bit7);
#else	
	o->value.format = PROPERTY_FORMAT_BOOLEAN;
    o->value.data.boolean.value = true; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 100, 步长: 1
 */
static void P_12_44_PanelHumidity_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};	
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x1E);
	property_value_new_integer(&o->value,RegSection1.BIT1.bit0_6);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_45_IndoorReturnTempa_doGet(property_operation_t *o)
{
	uint16_t Data = 0;
	PRINTF("%s %d\r\n",__FUNCTION__,__LINE__);
	memcpy(&Data,&g_uNo2RegList[0x3E],2);
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Temp = (float)((Data &0x7FFF)-1000)/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 66.0;  // TODO: 这里需要读到属性真正的值
#endif
	
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: 0.0, 最大值: 100.0, 步长: 0.1
 */
static void P_12_13_OutdoorMachCurrent_doGet(property_operation_t *o)
{
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Temp = (float)((g_uNo3RegList[0x21B-0x200]<<8) | g_uNo3RegList[0x21A-0x200])/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 66.0; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: 0.0, 最大值: 1000.0, 步长: 1.0
 */
static void P_12_14_OutdoorMachVoltage_doGet(property_operation_t *o)
{
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Temp = (float)((g_uNo3RegList[0x219-0x200]<<8) | g_uNo3RegList[0x218-0x200]);
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 88.0; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 1000, 步长: 1
 */
static void P_12_15_ExpansionValve_doGet(property_operation_t *o)
{
	uint16_t Temp = 0;
#if 	PROPERTY_TYPE
	Temp = (g_uNo3RegList[0x233-0x200]<<8) | g_uNo3RegList[0x232-0x200];
	property_value_new_integer(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 666;   // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_48_PanelTemp_doGet(property_operation_t *o)
{
	uint16_t Data = 0;
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	
	Data = ((g_uNo1RegList[0x1D]<<8) | g_uNo1RegList[0x1C])& 0x7FFF;
	Temp = (float)(Data-1000)/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = -1.1; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_22_Version_doGet(property_operation_t *o)
{
	char Str[120] = {0};
#if 	PROPERTY_TYPE
	sprintf(Str,"%04d,V%04d,V%04d,V%04d,V%04d,V%04d,V%04d,%04d,V%04d,V%04d,V%04d,V%04d,V%04d,V%04d",InDoorInfo->CurrentAllVer,InDoorInfo->CurrentMmwVer,InDoorInfo->Current3DVer,InDoorInfo->CurrentInCtrlVer,InDoorInfo->CurrentInDriVer,InDoorInfo->CurrentExtCtrlVer,InDoorInfo->CurrentExtDriVer,\
	InDoorInfo->GoalAllVer,InDoorInfo->GoalMmwVer,InDoorInfo->Goal3DVer,InDoorInfo->GoalInCtrlVer,InDoorInfo->GoalInDriVer,InDoorInfo->GoalExtCtrlVer,InDoorInfo->GoalExtDriVer);
	property_value_new_string(&o->value,Str);
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello"); // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_23_ExternalSerialNo_doGet(property_operation_t *o)
{
	char Buff[20] = {0};	
#if 	PROPERTY_TYPE
	memcpy(Buff,&g_uNo4RegList[0x033B-0x0300],20);	
	property_value_new_string(&o->value,Buff);
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello"); // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_24_BkSerialNo_doGet(property_operation_t *o)
{
	char Buff[40] = {0};		
#if 	PROPERTY_TYPE
	memcpy(Buff,&g_uNo4RegList[0x4F],40);
	property_value_new_string(&o->value,Buff);
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello"); // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: 0.0, 最大值: 200.0, 步长: 0.1
 */
static void P_12_25_ModuleTemp_doGet(property_operation_t *o)
{
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Temp = (float)((g_uNo3RegList[9]<<8)| g_uNo3RegList[8])/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 16.2; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_28_ThreePanelSn_doGet(property_operation_t *o)
{
	char Buff[20] = {0};		
#if 	PROPERTY_TYPE
	memcpy(Buff,&g_uNo4RegList[77],20);
	property_value_new_string(&o->value,Buff);
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello"); // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 65535, 步长: 1
 */
static void P_12_29_OutdoorLoadState_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection3 = {0};
#if 	PROPERTY_TYPE
	RegSection3.V8 = GetPbsRegValue(0x201);
	property_value_new_integer(&o->value,RegSection3.V8);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 888;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_54_PanelSerialNo_doGet(property_operation_t *o)
{
#if 	PROPERTY_TYPE
	property_value_new_string(&o->value,"hello");
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello");
#endif
	
}


/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_56_Radar_doGet(property_operation_t *o)
{
	char str[256] = {0};
#if 	PROPERTY_TYPE
	sprintf(str,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",\
	g_Section5Info[0],g_Section5Info[1],g_Section5Info[2],g_Section5Info[3],g_Section5Info[4],g_Section5Info[5],g_Section5Info[6]\
	,g_Section5Info[7],g_Section5Info[8],g_Section5Info[9],g_Section5Info[10],g_Section5Info[11],g_Section5Info[12],g_Section5Info[13]\
	,g_Section5Info[14],g_Section5Info[15],g_Section5Info[16],g_Section5Info[17],g_Section5Info[18],g_Section5Info[19],g_Section5Info[20]\
	,g_Section5Info[21],g_Section5Info[22],g_Section5Info[23]);	
	property_value_new_string(&o->value,str);
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello");
#endif
	
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: , 步长: 1
 */
static void P_12_17_AirFreshFanSpeed_doGet(property_operation_t *o)
{
	uint16_t Temp = 0;
#if 	PROPERTY_TYPE
	memcpy(&Temp,&g_uNo2RegList[0x78],2);
	property_value_new_integer(&o->value,(Temp&0x7FFF));	

#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 666;   // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 0(off), 1(Level1), 2(Lever2), 3(Lever3), 4(Lever4), 5(Lever5)
 */
static void P_12_18_AirFreshFanLevel_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection2 = {0};
#if 	PROPERTY_TYPE
	RegSection2.V8 = GetPbsRegValue(0x017A);
	property_value_new_integer(&o->value,RegSection2.BIT1.bit0_6);
	
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_63_FreshAirBoardSn_doGet(property_operation_t *o)
{
	char Buff[20] = {0};		
#if 	PROPERTY_TYPE
	memcpy(Buff,&g_uNo4RegList[0xC9],20);
	property_value_new_string(&o->value,Buff);
	
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello");
#endif	
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_64_FreshAirSensorTemp_doGet(property_operation_t *o)
{
	PRINTF("%s %d\r\n",__FUNCTION__,__LINE__);
	uint16_t Data = 0;
	memcpy(&Data,&g_uNo2RegList[0x7B],2);
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Temp = (float)((Data &0x7FFF)-1000)/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 66.0;  // TODO: 这里需要读到属性真正的值
#endif
}

/**
 * 格式: property_value_new_float(浮点数)　
 * 取值: 最小值: -40.0, 最大值: 150.0, 步长: 0.1
 */
static void P_12_65_FreshAirThsTemp_doGet(property_operation_t *o)
{
	PRINTF("%s %d\r\n",__FUNCTION__,__LINE__);
	uint16_t Data = 0;
	memcpy(&Data,&g_uNo2RegList[0x7D],2);
	float Temp = 0.0;
#if 	PROPERTY_TYPE
	Temp = (float)((Data &0x7FFF)-1000)/10.0;
	property_value_new_float(&o->value,Temp);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = 66.0;  // TODO: 这里需要读到属性真正的值
#endif
	
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 100, 步长: 1
 */
static void P_12_66_FreshAirThsHumid_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection2 = {0};
#if 	PROPERTY_TYPE
	RegSection2.V8 = GetPbsRegValue(0x017F);
	property_value_new_integer(&o->value,RegSection2.BIT1.bit0_6);
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_string(字符串)　
 * 取值: 字符串，没有限制取值范围
 */
static void P_12_67_FreshAirVersion_doGet(property_operation_t *o)
{
	char Str[60] = {0};
#if 	PROPERTY_TYPE
	sprintf(Str,"%04d,V%04d,V%04d,V%04d",InDoorInfo->CurrentFreshAirCtrlVer,InDoorInfo->CurrentFreshAirDriVer,InDoorInfo->GoalFreshAirCtrlVer,InDoorInfo->GoalFreshAirDriVer);
	property_value_new_string(&o->value,Str);
#else	
	o->value.format = PROPERTY_FORMAT_STRING;
	strncpy(o->value.data.string.value, "hello", strlen("hello")); // TODO: 这里需要读到属性真正的值
	o->value.data.string.length = strlen("hello");
#endif	
}

static void P_12_68_InFanPhaseCurrent_doGet(property_operation_t *o)
{
		uint16_t Temp = 0;
	#if 	PROPERTY_TYPE
		memcpy(&Temp,&g_uNo2RegList[0x80],2);
		property_value_new_integer(&o->value,(Temp&0x7FFF));	

	#else	
		o->value.format = PROPERTY_FORMAT_NUMBER;
		o->value.data.number.type = DATA_NUMBER_INTEGER;
		o->value.data.number.value.integerValue = 2;  // TODO: 这里需要读到属性真正的值
	#endif
}

static void P_12_69_FreshPhaseCurrent_doGet(property_operation_t *o)
{
	PRINTF("%s %d\r\n",__FUNCTION__,__LINE__);
	uint16_t Data = 0;
	float Temp = 0.0;
	InDoorBusReg RegSection2 = {0};
#if 	PROPERTY_TYPE
	
	Data = ((g_uNo2RegList[0x0183-0x0100]<<8) | g_uNo2RegList[0x182-0x100]) & 0x7FFF;
	Temp = (float)(Data - 15000)/10.0;
	property_value_new_float(&o->value,Temp);
	
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_FLOAT;
	o->value.data.number.value.floatValue = -16.0; // TODO: 这里需要读到属性真正的值
#endif
}	



void S_12_MachineState_doGet(property_operation_t *o)
{
    switch (o->piid)
    {
        case PIID_12_1_IndoorPipeTemp:
            P_12_1_IndoorPipeTemp_doGet(o);
            break;

        case PIID_12_3_IndoorFanSpeed:
            P_12_3_IndoorFanSpeed_doGet(o);
            break;

        case PIID_12_4_RealHeaterSwitch:
            P_12_4_RealHeaterSwitch_doGet(o);
            break;

        case PIID_12_5_RealindoorFanLever:
            P_12_5_RealindoorFanLever_doGet(o);
            break;

        case PIID_12_6_LightactivatedLevel:
            P_12_6_LightactivatedLevel_doGet(o);
            break;

        case PIID_12_7_OutdoorTemp:
            P_12_7_OutdoorTemp_doGet(o);
            break;

		case PIID_12_8_OutdoorPipeTemp:
            P_12_8_OutdoorPipeTemp_doGet(o);
            break;

        case PIID_12_9_OutdoorExhaustTemp:
            P_12_9_OutdoorExhaustTemp_doGet(o);
            break;
		
		case PIID_12_10_OutdoorFanLever:
            P_12_10_OutdoorFanLever_doGet(o);
            break;

        case PIID_12_11_CompressorFrequency:
            P_12_11_CompressorFrequency_doGet(o);
            break;

		case PIID_12_12_FourwayValveSwitch:
            P_12_12_FourwayValveSwitch_doGet(o);
            break;
		
		case PIID_12_13_OutdoorMachCurrent:
            P_12_13_OutdoorMachCurrent_doGet(o);
            break;

        case PIID_12_14_OutdoorMachVoltage:
            P_12_14_OutdoorMachVoltage_doGet(o);
            break;

        case PIID_12_15_ExpansionValve:
            P_12_15_ExpansionValve_doGet(o);
            break;
		
		case PIID_12_22_Version:
            P_12_22_Version_doGet(o);
            break;

        case PIID_12_23_ExternalSerialNo:
            P_12_23_ExternalSerialNo_doGet(o);
            break;

        case PIID_12_24_BkSerialNo:
            P_12_24_BkSerialNo_doGet(o);
            break;

        case PIID_12_25_ModuleTemp:
            P_12_25_ModuleTemp_doGet(o);
            break;

        case PIID_12_28_ThreePanelSn:
            P_12_28_ThreePanelSn_doGet(o);
            break;

        case PIID_12_29_OutdoorLoadState:
            P_12_29_OutdoorLoadState_doGet(o);
            break;
		
        case PIID_12_39_OutFanSpeed:
            P_12_39_OutFanSpeed_doGet(o);
            break;
        
        case PIID_12_43_IndooorHumidity:
            P_12_43_IndooorHumidity_doGet(o);
            break;

        case PIID_12_44_PanelHumidity:
            P_12_44_PanelHumidity_doGet(o);
            break;
		
		case PIID_12_45_IndoorReturnTempa:
            P_12_45_IndoorReturnTempa_doGet(o);
            break;

        case PIID_12_48_PanelTemp:
            P_12_48_PanelTemp_doGet(o);
            break;
		
		case PIID_12_54_PanelSerialNo:
            P_12_54_PanelSerialNo_doGet(o);
            break;
		
		case PIID_12_56_Radar:
            P_12_56_Radar_doGet(o);
            break;
		
		case PIID_12_17_AirFreshFanSpeed:
            P_12_17_AirFreshFanSpeed_doGet(o);
            break;

		case PIID_12_18_AirFreshFanLevel:
            P_12_18_AirFreshFanLevel_doGet(o);
            break;		

		case PIID_12_63_FreshAirBoardSn:
            P_12_63_FreshAirBoardSn_doGet(o);
            break;	

		case PIID_12_64_FreshAirSensorTemp:
            P_12_64_FreshAirSensorTemp_doGet(o);
            break;	

		case PIID_12_65_FreshAirThsTemp:
            P_12_65_FreshAirThsTemp_doGet(o);
            break;	

		case PIID_12_66_FreshAirThsHumid:
            P_12_66_FreshAirThsHumid_doGet(o);
            break;	

		case PIID_12_67_FreshAirVersion:
            P_12_67_FreshAirVersion_doGet(o);
            break;	
		
		case PIID_12_68_InFanPhaseCurrent:
            P_12_68_InFanPhaseCurrent_doGet(o);
            break;

		case PIID_12_69_FreshPhaseCurrent:
            P_12_69_FreshPhaseCurrent_doGet(o);
            break;			
		
        default:
            o->code = OPERATION_ERROR_VALUE;
            break;
    }
}
